class Patch(object):
    import difflib
    import simplejson
    
    def __init__(str1, str2=None)
        if str2 is None:
            #we're restoring from a serialized thing
            self.is_serialized = True
    
    @property
    def diff(self):
        if self.is_serialized:
            return simplejson.loads(self.serialized)
        else:
            return list(difflib.ndiff(self.str1.splitlines(), self.str2.splitlines()))
        
    def __serialize__(self):
        pass

def apply_diffs(prime, *diff_list)
    for diff in diff_list:
        diff.apply(prime)
